package com.usian.service.impl;

import com.usian.mapper.StockMapper;
import com.usian.pojo.Stock;
import com.usian.service.StockServcice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StockServiceImpl implements StockServcice {

    @Autowired
    StockMapper stockMapper;


    @Override
    public void DeductionStock(Stock stock) {
        stockMapper.updateById(stock);
    }

    @Override
    public Stock findBySkuId(Integer skuId) {
        return stockMapper.findBySkuId(skuId);
    }
}
